
function changeselect(){
	var item = $("#academySelect").find("option:selected").text();
	$("#academyName").attr('value',item);
	var itemId = $("#academySelect").val();
	$("#academyId").attr('value',itemId);
	$("#classSelect option").remove();
	$("#courseSelect option").remove();
	//查询班级
	 $.ajax({
         type: "get",
         cache: false,
         url: 'admin/classroom_queryClassRoom.action?pageing.academy='+item,
         dataType: "json",
         success: function (result) {
        	 var json= eval("("+result+")")["dataList"];
        	 $("#classSelect").append("<option value=''>请选择班级</option>");
        	 $.each(json,function(index,content){
        		 $("#classSelect").append("<option value='"+content.id+"'>"+content.className+"</option>");
        		 });
        	 
         },
         error: function (result) {
           
         }
     }

     );
	
}
function changeselect1(){
	
	var item = $("#classSelect").find("option:selected").text();
	var itemId = $("#classSelect").val();
	$("#className").attr('value',item);
	$("#classId").attr('value',itemId);
	 //查询课程
	 $.ajax({
        type: "get",
        cache: false,
        url: 'admin/course_queryCourse.action?pageing.stuClass='+item,
        dataType: "json",
        success: function (result) {
       	 var json= eval("("+result+")")["dataList"];
       	 $("#courseSelect").append("<option value=''>请选择课程</option>");
       	 $.each(json,function(index,content){
       		 $("#courseSelect").append("<option value='"+content.id+"'>"+content.course+"</option>");
       		 });
       	 
        },
        error: function (result) {
          
        }
    }

    );
}
function changeselect2(){
	var item = $("#courseSelect").find("option:selected").text();
	var itemId = $("#courseSelect").val();
	$("#courseName").attr('value',item);
	$("#courseId").attr('value',itemId);
}

$(function(){
	//查询学院
	$.ajax({
        type: "get",
        cache: false,
        url: 'admin/academy_queryAcademy.action?pageFinder.pageNo=1',
        dataType: "json",
        success: function (result) {
       	 var json= eval("("+result+")")["dataList"];
       	 $.each(json,function(index,content){
       		$("#academySelect").append("<option value='"+content.id+"'>"+content.academy+"</option>");
       		 });
       	 
        },
        error: function (result) {
          
        }
    }

    );
	
});